LDFLAGS=-lglfw -lGLEW -lGL -lGLU
CFLAGS=-O3
OFILES=main.o Shader.o ShaderProvider.o ObjReader.o VertexList.o Mesh.o TriangleList.o Object.o Node.o Fps.o Texture.o TexturePair.o
OFILESPATH=./bin/main.o ./bin/Shader.o ./bin/ShaderProvider.o ./bin/ObjReader.o ./bin/VertexList.o ./bin/Mesh.o ./bin/TriangleList.o ./bin/Object.o ./bin/Node.o ./bin/Fps.o ./bin/Texture.o ./bin/TexturePair.o
INCLUDES=-I. -I.. -I./Mesh -I./Shader -I./Render -I./Texture -I./Camera

all: $(OFILES)
#main.o Shader.o ShaderProvider.o ObjReader.o VertexList.o TriangleList.o Mesh.o Object.o
	g++ -o main $(OFILESPATH) $(LDFLAGS) $(CFLAGS) $(INCLUDES) -fwhole-program -flto
main.o:
	g++ -c main.cpp -o ./bin/main.o $(INCLUDES) $(CFLAGS)
Shader.o:
	g++ -c Shader/Shader.cpp  -o ./bin/Shader.o $(INCLUDES) $(CFLAGS)
ShaderProvider.o:
	g++ -c Shader/ShaderProvider.cpp -o ./bin/ShaderProvider.o $(INCLUDES) $(CFLAGS)
ObjReader.o:
	g++ -c Mesh/ObjReader.cpp -o ./bin/ObjReader.o $(INCLUDES) $(CFLAGS)
VertexList.o:
	g++ -c Mesh/VertexList.cpp -o ./bin/VertexList.o $(INCLUDES) $(CFLAGS)
TriangleList.o:
	g++ -c Mesh/TriangleList.cpp -o ./bin/TriangleList.o $(INCLUDES) $(CFLAGS)
Object.o:
	g++ -c Mesh/Object.cpp -o ./bin/Object.o $(INCLUDES) $(CFLAGS)
Mesh.o:
	g++ -c Mesh/Mesh.cpp  -o ./bin/Mesh.o $(INCLUDES) $(CFLAGS)
Node.o:
	g++ -c Node.cpp  -o ./bin/Node.o $(INCLUDES) $(CFLAGS)
Fps.o:
	g++ -c Render/Fps.cpp  -o ./bin/Fps.o $(INCLUDES) $(CFLAGS)
Texture.o:
	g++ -c Texture/Texture.cpp  -o ./bin/Texture.o $(INCLUDES) $(CFLAGS)
TexturePair.o:
	g++ -c Texture/TexturePair.cpp  -o ./bin/TexturePair.o $(INCLUDES) $(CFLAGS)
clean:
	rm main *.o ./bin/*.o
do:	clean	all
